<link rel="stylesheet" href="${baseStaticUrl}/plugins/ztree/css/zTreeStyle/zTreeStyle.css" type="text/css">
<script type="text/javascript" src="${baseStaticUrl}/plugins/ztree/js/jquery.ztree.core.js"></script>
<script type="text/javascript" src="${baseStaticUrl}/plugins/ztree/js/jquery.ztree.excheck.js"></script>
<div class="form-container">
	<div class="box">
        <form action="#" method="post" name="suvForm" id="suvForm">
        	<div class="row visa-row">
                <div id="wait-msg" class="alert alert-info"
                     style="background:url(${baseStaticUrl}/images/ajax-loader.gif) no-repeat scroll 0.5em 50%;display:none"></div>
                <div id="alert-msg" class="alert alert-success" style="display:none"></div>
                <div id="error-msg" class="alert alert-danger" style="display:none"></div>
            </div>
            <div class="row visa-row">
            	<h6 class="mg-b-20 h6-mar-sm">
                    <strong>数据字典管理</strong>
                </h6>
                <div class="row w-row">
                    <div class="col-md-1 col-xs-12 w-row1"><span class="span_red">*</span>消息标题</div>
                        <div class="col-md-3 col-xs-12 w-row2">
                            <input type="text" onchange="checkInfoTitle()" class="form-control form-control-sm" id="xxbt" name="sysInfoDao.info_title"
                                   value="${sysInfoDao.info_title}">
                            <input type="hidden" name="sysInfoDao.id" value="${sysInfoDao.id}" id="ID">
                        </div>
                        <div class="col-md-1 col-xs-12 w-row1"><span class="span_red">*</span>消息类型</div>
                        <div class="col-md-3 col-xs-12 w-row2">
                            <epoch:radio name="sysInfoDao.info_type" id="xxlx" list="${lisFun.getDictCode('SYS_INFO_TYPE')}"
                                      checked="${sysInfoDao.info_type!=null ? sysInfoDao.info_type:'1'}"></epoch:radio>
                        </div>
                        <div class="col-md-1 col-xs-12 w-row1"><span class="span_red">*</span>状态</div>
						<div class="col-md-3 col-xs-12 w-row2">
								<epoch:radio name="sysInfoDao.status" id="xxzt" list="${lisFun.getDictCode('PUB_ENABLE_DISABLE')}"
	                        			checked="${sysInfoDao.status!=null ? sysInfoDao.status:'ENABLE'}"></epoch:radio>
						</div>
				 </div>
				 <div class="row w-row">
                    <div class="col-md-1 col-xs-12 w-row1">消息描述</div>
                       <div class="col-md-11 col-xs-12 w-row2">
                                <textarea rows="6" cols="129" id="xxms" style="resize: none" name="sysInfoDao.info_desc" class="form-control form-control-sm" maxlength="500"
                                          >${sysInfoDao.info_desc}</textarea>
                       </div>
                 </div>
            </div>
        </form>
    </div>
</div>
<script type="text/javascript">
	_headToolBar.saveBtn(null, null, suv);    
    function suv(){
    	if(isEmpty($("#xxbt").val())){
            showErrorMessage("error-msg","消息标题不能为空!");
            $("#xxbt").focus();
            return;
        }
    	saveFun();
	}
    function saveFun(){
    	$.ajax({
    		url:"${basePath}/sys/info/saveInfo",
    		data:$("form").serialize(),
    		type:"post",
    		success:function(result){
    			if(result){
    				if(result.code=="0"){
    					MessageBox.success("保存成功！");
    					_tabs.showPage("list");
    				}else{
    					MessageBox.error("保存失败！");
    				}
    			}else{
    				MessageBox.error("保存失败！");
    			}
    		},
    		error:function(){
    			MessageBox.error("服务器错误，请稍后再试！");
    			setSubmitStatu(false);
    		},
    		async:false
    	});
    }

</script>